package cn.iocoder.yudao.module.cms.keyword.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import java.time.LocalDateTime;

import static cn.iocoder.yudao.module.api.infrastructure.DictTypeConstants.BOOLEAN_STRING;

@Tag(name = "搜索词 Response VO")
@Data
@ExcelIgnoreUnannotated
public class KeywordRespVO {

    @Schema(description = "唯一编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10116")
    @ExcelProperty("唯一编号")
    private Long id;

    @Schema(description = "关键词类型：default、article、feedback、issue、……", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("关键词类型")
    private String type;

    @Schema(description = "关键词内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("关键词内容")
    private String content;

    @Schema(description = "累计搜索次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "20391")
    @ExcelProperty("计搜索次数")
    private Integer count;

    @Schema(description = "跳转链接", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://example.local")
    @ExcelProperty("跳转链接")
    private String url;

    @Schema(description = "是否热门词", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否热门词", converter = DictConvert.class)
    @DictFormat(BOOLEAN_STRING)
    private Boolean isHot;

    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("排序")
    private Integer sort;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
